<?php
namespace Ccc\Gal\Domain\Model;

/*                                                                        *
 * This script belongs to the FLOW3 package "Ccc.Gal".                    *
 *                                                                        *
 *                                                                        */

use TYPO3\FLOW3\Annotations as FLOW3;
use Doctrine\ORM\Mapping as ORM;

/**
 * A Gallery
 *
 * @FLOW3\Entity
 */
class Gallery {

	/**
	 * The entries gallery.
	 *
	 * @var string
	 * @FLOW3\Validate(type="NotEmpty")
	 * @FLOW3\Validate(type="Text")
	 * @FLOW3\Validate(type="StringLength", options={ "minimum"=2, "maximum"=80 })
	 * @ORM\Column(length=80)
	 */
	protected $galleryname = '';
	
	/**
	 * The images contained in this gallery
	 *
	 * @var \Doctrine\Common\Collections\Collection<\Ccc\Gal\Domain\Model\Image>
	 * @ORM\OneToMany(mappedBy="gallery")
	 * @ORM\OrderBy({"date" = "DESC"})
	 */
	protected $images;
	
	/**
	 * Set Galleryname
	 *
	 * @param string $galleryname The Gallerys name
	 * @return void
	 */
	 
	public function setGalleryname($galleryname) {
		$this->galleryname = $galleryname;
	}
	
	/**
	 * Get the Galleryname
	 *
	 * @return galleryname The Galleries name
	 */
	public function getGalleryname() {
		return $this->galleryname;
	}
	
}
?>